home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / RandAnim.lha / Anim Randomiser / Random_IBrowse_Anim_Go! < prev    next >
Encoding:
Text File  |  1998-09-13  |  1020 b   |  47 lines

  1. /* Randomise Transfer Anim */
  2. /* A small program to allow random IBrowse Transfer Anims */
  3. /* D. O'Cuinn 1998 */
  4.  
  5. address COMMAND
  6.  
  7. 'failat 21'
  8.  
  9. if ~exists("IBrowse") then do
  10.     say "This program must be executed from inside the IBrowse directory!"
  11.     exit
  12. end
  13.  
  14. /* how many have we got then? */
  15. maxanims = 0
  16.  
  17. do i = 1 to 1000
  18.     if exists("Transfer_Anims/def_TransferAnimation." || i)
  19.         then maxanims = maxanims + 1
  20.     else
  21.         break
  22. end
  23.  
  24. /* say "I have found " || maxanims || " Anims" */
  25.  
  26. if maxanims > 0 then do
  27.     anim = random(1,maxanims, time('S')) /* time supplied as seed */
  28.  
  29.     anim = 'def_Transferanimation.' || anim
  30.     'copy Transfer_Anims/' || anim || ' TO images/def_TransferAnimation' 
  31.     'copy Transfer_Anims/' || anim || '.info TO images/def_TransferAnimation.info' 
  32. end
  33.  
  34. /* Try to find WBRun so as not to lose tooltype info */
  35.  
  36. 'which >T:tempobrowse WBRun'
  37.  
  38. x = open('tempy', 'T:tempobrowse', 'R')
  39. dummy = readch('tempy', 1)
  40.  
  41. if length(dummy) > 0 then
  42.     'WBRun <>NIL: Ibrowse'
  43. else
  44.     'Run <>NIL: Ibrowse'
  45.  
  46. x = close('tempy')
  47.